#!/bin/sh
# NAME: update_meterserv_package.sh
# DESC: uses ipkg to update the meterserv application from
#        the repository.
#
echo "Content-type: text/html"
echo ""
echo "<p>"
echo `whoami`
echo "</p>"
if [ ! -f /etc/ipkg/meterserv.conf ]; then
  echo "Adding meterserv to ipkg repositories."
  echo "src/gz meterserv http://meterserv.webhop.net/Downloads" > /etc/ipkg/meterserv.conf
fi
echo "<p>Updating list of packages...</p>"
ipkg update
echo "<p>Upgrading meterserv (if a new version is available)</p>"
ipkg upgrade meterserv
echo "<p>Done!!!</p>"

